5. Post Installation Tasks
After SQL Server 2012 is installed,
additional settings need to be configured and tasks need to be completed
to have a production-ready server. Some of these settings are geared
toward fine-tuning the SQL Server instance for optimal performance.
Other settings and tasks are geared toward securing, auditing, and
monitoring the SQL Server instance.
Memory
Two important server property settings
include maximum and minimum server memory. By default, SQL Server is
configured with a minimum memory of 0MB and a maximum memory of
2147483647MB (2TB), as shown in Figure 16.
The consequences of leaving the default values for
these two settings is sometimes misunderstood and often overlooked. The
minimum server memory setting specifies the amount of memory that will
not be released back to the operating system by SQL Server when
allocated. In other words, SQL Server holds on to this minimum amount of
memory even if it is no longer needed.
Misconception
A common misconception is that SQL
Server immediately allocates up to this minimum amount of memory upon
startup. Instead, SQL Server allocates memory only as it is required and
may or may not reach the minimum server memory value specified.
The minimum server memory setting does not need to
be changed unless the operating system constantly requests memory
resources for other applications sharing the same memory space. You want
to avoid having to release too much memory to the operating system and
potentially starve a SQL Server instance from memory.
On the other hand, the maximum server memory
setting limits the maximum amount of memory a SQL Server instance can
allocate. A value set too high can potentially starve an operating
system from memory resources. The maximum server memory value should not
equal or exceed the total amount of server memory available. This value
should be at least 1GB less than the total server memory.
Additional SQL Server settings such as processor
affinity, parallelism thresholds, login auditing, and network packet
size may need to be configured depending on your environment
requirements. You can configure the most commonly used SQL Server
settings and properties using SQL Server Management Studio (SSMS). You
can access the complete set of configuration options using the
sp_configure System Stored Procedure.
6. TCP/IP Ports
Default instances of SQL Server use default
TCP/IP port 1433 to communicate with clients. Named SQL Server instances
on the other hand are dynamically assigned TCP/IP ports upon service
startup. For hacking prevention and firewall configuration purposes, you
may need to change default ports and control the port numbers over
which named SQL Server instances communicate.
SQL Server 2012 includes a tool called SQL Server
Configuration Manager to manage SQL Server services and their related
network configurations. The SQL Server Configuration Manager can be
found under Microsoft SQL Server 2012 ? Configuration Tools folder in
the Start Menu. Figure 17 shows the TCP/IP Properties dialog box in SQL Server Configuration Manager where the default 1433 port can be changed.
Best Practices Analyzer (BPA)
The Microsoft SQL Server 2012 Best
Practices Analyzer (BPA) is a free diagnostic tool that gathers
information about installed SQL Server 2012 instances, determines if the
configurations align to recommended best practices, outlines settings
that do not align to these recommendations, indicates potential
problems, and recommends solutions.
BPA can help you identify potential issues about
your SQL Server 2012 installation. It is always best to catch
configuration issues before a server goes into production to avoid
unplanned downtime.
Patches
After a freshly installed SQL Server
instance, it is always recommended to review available updates. SQL
Server updates may be available in the form of hotfixes, cumulative
updates, and service packs. To avoid negatively impacting your
applications, all updates need to be reviewed carefully before they are
applied. It is not recommended to enable automatic updates on production
SQL Server instances. All updates should be tested in a controlled
testing environment before they are applied in production.
Other updates, on the other hand, may be critical
security fixes against newly discovered threats such as software worms
and other vulnerabilities.
Monitoring
Being on top of what's going on in your
SQL Server instances is one of the most important job functions of
database administrators. With so many areas to monitor including
resource utilization, performance, availability, critical events,
errors, jobs, and so on, you must implement a monitoring framework to
capture real-time metrics and keep the history of them to analyze trends
and patterns.
SQL Server 2012 includes real-time monitoring
through the Activity Monitor that can be launched from SQL Server
Management Studio (SSMS). In addition, SQL Server 2012 comes packed with
a performance metric collection and monitoring framework called
Management Data Warehouse that can help you keep track of you
environment along with some of the included performance dashboards.
Other tools and features included with SQL Server
2012, such as SQL Server Profiler, Extended Events, and Dynamic
Management Views (DMVs), can help you uncover details of running
processes and pinpoint issues. You can also use Microsoft products such
as System Center Operations Manager (SCOM) and other third-party tools
to monitor SQL Server 2012 instances. For more details on Performance
Monitoring, refer to Part 7, “Monitoring and Auditing.”
Model Database
The model database is a system database
that serves as a template for all user databases. On creation, every
user database inherits database objects from the model database
including database options, such as recovery model, database initial
size, and autogrowth settings, permissions, roles, tables, functions,
stored procedures, and so on.
Modifying the model database ensures that all user
databases have a standardized set of database objects when they are
created, which can greatly simplify manual processes.